<?php
  require_once('functions/config.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
  <title>dev <?php echo CORE_VERSION; ?></title>
  
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="author" content="kaktus283" />
  <link rel="stylesheet" href="images/untitled.css" type="text/css" />
</head>
<body>
<div id="container">
  <div id="statusBar">
    <div id="frame">
<?php  
  $mysql_connect = mysql_connect( DB_CORE_ADDRESS, DB_CORE_USERNAME, DB_CORE_PASSWORD );
  $mysql_select_db = mysql_select_db( DB_CORE_DATABASE );
  $mysql_query = mysql_query("SELECT * FROM players WHERE id=1") or die('Błąd zapytania'); 
  
  if(mysql_num_rows($mysql_query) > 0) {
    while($r = mysql_fetch_assoc($mysql_query)) {
      $gold = number_format( $r['gold'], 0, '', '.' );
      $iron = number_format( $r['fe'], 0, '', '.' );
      $stone = number_format( $r['stone'], 0, '', '.' );
      $wood = number_format( $r['wood'], 0, '', '.' );
    }
  }
  mysql_close( $mysql_connect );
  
    echo '     <div id="image"><div class="gold"></div></div><div id="info">'.$gold.'</div>
     <div id="image"><div class="wood"></div></div><div id="info">'.$wood.'</div>
     <div id="image"><div class="stone"></div></div><div id="info">'.$stone.'</div>
     <div id="image"><div class="iron"></div></div><div id="info">'.$iron.'</div>';
?>  
    </div>
  </div>
  <div id="menu"></div>
  <div id="content">
    <?php
      if($_GET['id'] == 'profile') require('profile.php');
      if($_GET['id'] == 'buildings') require('buildings.php');
      if($_GET['id'] == 'fight') require('fight.php');
      if($_GET['id'] == 'settings') require('settings.php');
    ?>
</div>
  <div id="panel"></div>





<br /><br />{ <a href="?id=profile">Profil</a> | <a href="?id=buildings">Budynki</a> |  <a href="?id=fight">Wyprawy</a> | <a href="?id=settings">Ustawienia</a> }<br />
</div>
</body>
</html>
